<template>
  <svg :style="{ width, height }">
    <use :xlink:href="prefix + name" :fill="color"></use>
  </svg>
</template>

<script setup lang="ts">
defineProps({
  //前缀
  prefix: {
    type: String,
    default: "#icon-",
  },
  //图标名字
  name: String,
  //颜色
  color: {
    type: String,
    default: "",
  },
  //宽度
  width: {
    type: String,
    default: "30px",
  },
  //高度
  height: {
    type: String,
    default: "30px",
  },
});
</script>

<style scoped></style>
